package com.wang.java.basic.features.reference;

import java.lang.ref.PhantomReference;
import java.lang.ref.ReferenceQueue;

public class PhantomReferenceTest {
    public static void main(String[] args) {
        byte[] bytes = new byte[1024 * 1024];
        ReferenceQueue referenceQueue = new ReferenceQueue();
        PhantomReference<byte[]> phantomReference = new PhantomReference(bytes, referenceQueue);
        System.out.println(phantomReference.get());
    }
}
